package com.iakuil.app.domain.dto.vo;

import com.iakuil.app.domain.dto.AuthorDto;
import com.iakuil.app.domain.dto.BookDto;
import com.iakuil.app.domain.dto.PressDto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 书籍信息 视图对象
 *
 * @author Kai
 * @date 2023-11-28
 **/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Schema(description = "书籍详情")
public class BookInfoVo extends BookDto {

    @Schema(description = "作者")
    private AuthorDto[] author;

    @Schema(description = "出版社")
    private PressDto press;

    @Schema(description = "简介")
    private String introduction;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @Schema(description = "修改时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
}
